package com.wunu.zn.api.appliance.model;

import java.util.List;
import java.util.Map;

import common.plugin.mybatis.Db;
import common.plugin.mybatis.Model;
import common.plugin.mybatis.Table;

@Table("t_operate_activity")
public class BannerEntity extends Model<BannerEntity>{
	/**
	 * 查询Banner列表
	 * @param openId
	 * @return
	 */
	public static List<Map<String, Object>> getBannerList() {
		
		String sql="SELECT id,link,image FROM t_operate_activity o WHERE o.isDel = 0 AND  o.startTime<=NOW() AND o.endTime >= NOW()";
		 List<Map<String, Object>> list = Db.find(sql, null);
		  if(list!=null && list.size()>0){
			  return list;
			}
		
		 return null;
	}
}
